﻿using GameTools.Service.ConfigServer;
using GameTools.Service.Nlog;
using GameTools.ViewModels;
using GameTools.Views;
using GameTools.Views.Pages;
using Prism.Ioc;
using System.Windows;

namespace GameTools
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //view
            containerRegistry.RegisterForNavigation<XiYouPage,XiYouPageViewModel>();
            containerRegistry.RegisterForNavigation<SettingsPage, SettingsPageViewModel>();

            //service
            containerRegistry.RegisterSingleton<ILogService, LogService>();
            containerRegistry.RegisterSingleton<IConfigService, ConfigService>();
        }
    }
}
